package com.pig4cloud.pigx.common.security.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig4cloud.pigx.common.security.component.exceptionProcessed.PigxAuth2ExceptionSerializer;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

/**
 * @description:
 * @Author 兔子不吃窝边曹
 * @create 2022/8/8 10:16
 **/
@JsonSerialize(using = PigxAuth2ExceptionSerializer.class)
public class PigxAuth2Exception extends OAuth2Exception {

    @Getter
    private String errorCode;

    public PigxAuth2Exception(String msg) {
        super(msg);
    }

    public PigxAuth2Exception(String msg, Throwable t) {
        super(msg, t);
    }

    public PigxAuth2Exception(String msg, String errorCode) {
        super(msg);
        this.errorCode = errorCode;
    }

}
